//
//  ShengJCustomCollectionViewCell.m
//  JiuKuGospel
//
//  Created by jiukuyinyue on 15-9-11.
//  Copyright (c) 2015年 JiuKuForApp. All rights reserved.
//

#import "ShengJCustomCollectionViewCell.h"

@implementation ShengJCustomCollectionViewCell


- (void)setMessageDic:(NSMutableDictionary *)messageDic
{
    [self setupUI:messageDic];

}

- (void)setupUI:(NSMutableDictionary *)messageStr
{
    [self.allView removeFromSuperview];
    self.allView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height)];
    [self addSubview:_allView];
    
    CGFloat tempH = 20;
    if (ScreenHeight == 667 || ScreenHeight == 736){
        tempH = 25;
    }

    
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height-tempH)];
    _titleLabel.text = [messageStr objectForKey:@"title"];
    _titleLabel.font = FONT_24;
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    _titleLabel.textColor = [UIColor blackColor];
    [_allView addSubview:_titleLabel];
    
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, _titleLabel.bottom, _allView.width, tempH)];
    _nameLabel.text = [messageStr objectForKey:@"name"];
    _nameLabel.font = FONT_12;
    _nameLabel.textAlignment = NSTextAlignmentCenter;
    _nameLabel.textColor = [UIColor blackColor];
    [_allView addSubview:_nameLabel];
    
    self.bottomLine = [[UIView alloc] initWithFrame:CGRectMake(0, _allView.height-0.5, _allView.width, 0.5)];
    _bottomLine.backgroundColor = JK_HUISE_LINE_COLOR;
    [_allView addSubview:_bottomLine];

    self.rightLine = [[UIView alloc] initWithFrame:CGRectMake(_allView.width-0.5, 0, 0.5, _allView.height)];
    _rightLine.backgroundColor = JK_HUISE_LINE_COLOR;
    [_allView addSubview:_rightLine];

}

@end
